<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹性伸缩比例</title>
  <style>
    .box{
      display: flex;
      flex-direction: column;
      height: 300px;
      border: 1px solid #000;
    }
    .box div{
      /*height: 100px;*/
      background-color: pink;
    }
    .box div:nth-child(1){
        width: 200px;
    }
     /*表示div2占用父级剩余的尺寸的分数 占了1份*/
    .box div:nth-child(2){
     flex:1;
    }
    /*表示div3占用父级剩余的尺寸的分数 占了2份*/
    .box div:nth-child(3){
        flex:2;
    }
  </style>
</head>
<body>
<div class="box">
  <div>1</div>
  <div>2</div>
  <div>3</div>
</div>
</body>
</html>
